package com.example.stuSysbackend.mapper;

import com.example.stuSysbackend.domain.ApprovalRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import static com.baomidou.mybatisplus.core.assist.ISqlRunner.INSERT;
import static org.apache.ibatis.jdbc.SqlBuilder.VALUES;

/**
* @author Cool
* @description 针对表【approval_records(审批表)】的数据库操作Mapper
* @createDate 2024-04-16 16:54:55
* @Entity generator.domain.ApprovalRecords
*/
@Mapper
public interface ApprovalRecordsMapper extends BaseMapper<ApprovalRecords> {
    @Update("update approval_records set status = 1 where id = #{id} and status = 0 ")
    void updateStatus1(Integer id);
    @Update("update approval_records set status = 2 where id = #{id} and status = 1 ")
    void updateStatus2(Integer id);
    @Update("update approval_records set status = 0 where id = #{id} and status in (1,2)")
    void updateBack(Integer id);
}




